package com.yourenbang.lingyun.transaction.web.domain.dto.pay.lakala;

import com.yourenbang.lingyun.core.util.date.DateFormat;
import com.yourenbang.lingyun.core.util.json.ToJSON;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 拉卡拉代付
 */
@Data
public class LakalaReplaceDTO implements Serializable, ToJSON {

    private String action = "commit";

    private String sid;

    private String service = "record";

    private String busid = "030006";

    private String chncode;                 //渠道标识

    private String instcode;                //受理机构号

    private String mercid;                  //商户号

    private String busmercode;              //业务商户号

    private String termid;                  //终端号码  用户ID

    private String telecode;                //线路号码  手机号

    private String chntype;                 //输入条件

    private String mobile;                  //手机号

    private String inpan;                   //付款目标卡号

    private String blname;                  //付款目标卡户名

    private String amount;                  //付款金额  12位长，分为单位，左补零

    private String tdtm = DateFormat.DATETIME_COMPACT.format(LocalDateTime.now());  //发送时间

    private String idnumber;                //身份证

    private String notesdesc;

    private String curcode = "156";

    private String series;                  //发送方跟踪号

    private String sign;

    public String toSign(){
        return sid+mercid+chncode;
    }

}
